<p class="Head1"><help:paragraphinfo state="U" number="1"/><help:key-word value="Asc; function" tag="kw66545_1"/><help:link Id="66545">Asc Function [Runtime]</help:link></p>
<p class="Paragraph"><help:paragraphinfo state="U" number="2"/>Returns the ASCII (American Standard Code for Information Interchange) value of the first character in a string expression.</p>
<p class="Paragraph"><help:paragraphinfo state="U" number="8" xmlns:help="http://openoffice.org/2000/help"/><span class="T1">Text:</span> Any valid string expression. Only the first character in the string is relevant.</p>
<p class="Paragraph"><help:paragraphinfo state="U" number="9" xmlns:help="http://openoffice.org/2000/help"/>Use the Asc function to replace keys with values. If the Asc function encounters a blank string, <help:productname xmlns:help="http://openoffice.org/2000/help">%PRODUCTNAME</help:productname> Basic reports a run-time error. In addition to printable 8 bit ASCII characters (Codes 32-255), the ASCII function can also detect non-printable key codes in ASCII code. This function can also handle 16 bit unicode characters.</p>
<p class="PropText"><help:paragraphinfo state="U" number="12" xmlns:help="http://openoffice.org/2000/help"/>Print ASC("A") REM returns 65</p>
<p class="PropText"><help:paragraphinfo state="U" number="13" xmlns:help="http://openoffice.org/2000/help"/>Print ASC("Z") REM returns 90</p>
<p class="PropText"><help:paragraphinfo state="U" number="14" xmlns:help="http://openoffice.org/2000/help"/>Print ASC("Las Vegas") REM returns 76, since only the first character is taken into account</p>